<!DOCTYPE html>
<html>
<head>
    <title>添加医生--中软高科-2015</title>
    <meta charset="UTF-8">
    <link rel="stylesheet" type="text/css" href="../Css/bootstrap.css"/>
    <link rel="stylesheet" type="text/css" href="../Css/bootstrap-responsive.css"/>
    <link rel="stylesheet" type="text/css" href="../Css/style.css"/>
    <script type="text/javascript" src="../Js/jquery.js"></script>
    <script type="text/javascript" src="../Js/jquery.sorted.js"></script>
    <script type="text/javascript" src="../Js/bootstrap.js"></script>
    <script type="text/javascript" src="../Js/ckform.js"></script>
    <script type="text/javascript" src="../Js/common.js"></script>
    <script type="text/javascript" src="../Js/ckeditor/ckeditor.js"></script>
    <style type="text/css">
        body {
            padding-bottom: 40px;
        }
        .sidebar-nav {
            padding: 9px 0;
        }

        @media (max-width: 980px) {
            /* Enable use of floated navbar text */
            .navbar-text.pull-right {
                float: none;
                padding-left: 5px;
                padding-right: 5px;
            }
        }
    </style>
</head>
<body>
<form id="addFrom" action="" method="post" class="definewidth m20">
    <table class="table table-bordered table-hover definewidth m10">
        <tr>
            <td width="10%" class="tableleft"><font color="red">*</font>姓名</td>
            <td><input type="text" name="dName" value="" required/></td>
        </tr>

        <tr>
            <td width="10%" class="tableleft"><font color="red">*</font>身份证号</td>
            <td><input type="text" name="dIdcar" value=""/></td>
        </tr>
        <tr>
            <td width="10%" class="tableleft"><font color="red">*</font>手机</td>
            <td><input type="text" name="dPhone" value=""/></td>
        </tr>
        <tr>
            <td width="10%" class="tableleft">座机</td>
            <td><input type="text" name="dTelphone" value=""/></td>
        </tr>
        <tr>
            <td width="10%" class="tableleft">性别</td>
            <td><input type="radio" name="dSex" value="0" checked/>男&nbsp;&nbsp;&nbsp;<input type="radio" name="dSex" value="1"/>女
            </td>
        </tr>
        <tr>
            <td width="10%" class="tableleft"><font color="red">*</font>出生年月</td>
            <td><input type="date" name="dBirthday" value=""/></td>
        </tr>
        <tr>
            <td width="10%" class="tableleft"><font color="red">*</font>入职时间</td>
            <td><input type="date" name="dIntime" value=""/></td>
        </tr>
        <tr>
            <td width="10%" class="tableleft"><font color="red">*</font>年龄</td>
            <td><input type="text" name="dAge" value=""/></td>
        </tr>
        <tr>
            <td width="10%" class="tableleft">电子邮箱</td>
            <td><input type="text" name="dEmail" value=""/></td>
        </tr>
        <tr>
            <td width="10%" class="tableleft">所属科室</td>
            <td>
                <select name="dKeshi">
                    <option value="急诊科">急诊科</option>
                    <option value="骨科">骨科</option>
                    <option value="血液科">血液科</option>
                    <option value="血液科">妇科</option>
                    <option value="血液科">儿科</option>
                    <option value="血液科">内科</option>
                    <option value="血液科">呼吸科</option>
                    <option value="血液科">消化科</option>
                    <option value="血液科">风湿免疫科</option>
                    <option value="血液科">肝胆科</option>
                    <option value="血液科">大肠</option>

                </select>
            </td>
        </tr>
        <tr>
            <td width="10%" class="tableleft">学历</td>
            <td>
                <select name="dXueli">
                    <option value="专科">专科</option>
                    <option value="本科">本科</option>
                    <option value="博士">博士</option>
                    <option value="博士后">博士后</option>
                </select>
            </td>
        </tr>
        <tr>
            <td width="10%" class="tableleft"><font color="red">*</font>备注</td>
            <td><textarea name="dDesc"></textarea></td>
        </tr>
        <tr>
            <td colspan="2">
                <center>
                    <button id="addDoctor" type="button" class="btn btn-primary">添加</button> &nbsp;&nbsp;
                    <button type="reset" class="btn btn-primary">重置</button>&nbsp;&nbsp;
                    <button type="button" class="btn btn-success" name="backid" id="backid">返回列表
                    </button>
                </center>
            </td>
        </tr>
    </table>
</form>
</body>
</html>
<script type="text/javascript">
    $(function () {
        //返回列表
        $('#backid').click(function () {
            window.location.href = "index.html";
        });
        //添加
        $('#addDoctor').click(function (){
            $.ajax({
                type: "POST",
                url: "/hospital/doctor/",
                data: $('#addFrom').serialize(),
                dataType: "json",
                success: function (vo) {
                    if (vo.code == 200){
                        alert("添加成功！")
                        window.location.href = "/doctor/index.html";
                    }else {
                        alert("添加失败！"+vo.msg);
                    }
                }
            });
        });


    });
</script>